/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.employee.dao;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Component;

import com.chlitina.store.common.persistence.BaseDao;
import com.chlitina.store.common.persistence.BaseDaoImpl;
import com.chlitina.store.modules.employee.entity.StoreBonusSettingTemplateCard;

/**
 * 新开卡或卡充值提成模板DAO接口
 * @author liujiang
 * @version 2013-11-14
 */
public interface StoreBonusSettingTemplateCardDao extends StoreBonusSettingTemplateCardDaoCustom, CrudRepository<StoreBonusSettingTemplateCard, Long> {
	@Query("select cs.card_template_id from StoreBonusSettingTemplateCard cs where cs.store.id=?1 and cs.card_template_type=?2")
	public List<Long> getExistTemplateId(Long storeId, int type);
}

/**
 * DAO自定义接口
 * @author liujiang
 */
interface StoreBonusSettingTemplateCardDaoCustom extends BaseDao<StoreBonusSettingTemplateCard> {

}

/**
 * DAO自定义接口实现
 * @author liujiang
 */
@Component
class StoreBonusSettingTemplateCardDaoImpl extends BaseDaoImpl<StoreBonusSettingTemplateCard> implements StoreBonusSettingTemplateCardDaoCustom {

}
